//package cn.bdqn.repository;
//
//import cn.bdqn.pojo.Plan;
//import cn.bdqn.pojo.PlanBeans;
//import org.springframework.data.jpa.repository.JpaRepository;
//import org.springframework.data.jpa.repository.Query;
//
//import java.util.List;
//
//public interface  Work_PlanRepository extends JpaRepository<Plan,Integer> {
//    //年度计划显示
//    @Query(value = "select new cn.bdqn.pojo.PlanBeans(p,u,po,s,a,au,py) from Plan p,User u,Project po,Planstate s,PlanAnnual a,Audit au,PlanType py " +
//            "where  p.userId=u.id and p.projectIdName=po.id and p.planstateId=s.id and p.annualPlan=a.id and p.auditId=au.id and p.plantypeId=py.id ")
//    public List<PlanBeans>  find();
//
//    //获取年度计划总数
//    @Query(value = "SELECT COUNT(p.id) FROM Plan p,PlanAnnual a WHERE a.id=p.annualPlan AND a.id=?1")
//    public int planCount(int count);
//    //获取新增计划总数
//    @Query(value = "SELECT COUNT(p.id) FROM Plan p,PlanAnnual a WHERE a.id=p.annualPlan AND a.id=?1")
//    public int planCount2(int count);
//    //获取未完成总数
//    @Query(value = "\n" +
//            "SELECT COUNT(p.id) FROM Plan p,Planstate ps,PlanAnnual pa WHERE p.annualPlan=pa.id AND ps.id=p.planstateId AND ps.id=1 AND pa.id=?1")
//    public int planCount3(int count);
//    //获取未完成总数
//    @Query(value = "SELECT COUNT(p.id) FROM Plan p,Planstate ps,PlanAnnual pa WHERE p.annualPlan=pa.id AND ps.id=p.planstateId AND ps.id=1 AND pa.id=?1")
//    public int planCount4(int count);
//    //获取完成总数
//    @Query(value = "\n" +
//            "SELECT COUNT(p.id) FROM Plan p,Planstate ps,PlanAnnual pa WHERE p.annualPlan=pa.id AND ps.id=p.planstateId AND ps.id=2 AND pa.id=?1")
//    public int planCount5(int count);
//    //获取未成总数
//    @Query(value = "SELECT COUNT(p.id) FROM Plan p,Planstate ps,PlanAnnual pa WHERE p.annualPlan=pa.id AND ps.id=p.planstateId AND ps.id=2 AND pa.id=?1")
//    public int planCount6(int count);
//    //获取计划类型
//    @Query(value = "select new cn.bdqn.pojo.PlanBeans(p) from PlanType p")
//    public List<PlanBeans> findPlanType();
//    //获取计划类型
//    @Query(value = "select new cn.bdqn.pojo.PlanBeans(pa) from PlanAnnual pa ")
//    public List<PlanBeans> findPlanAnnual();
//
//}
